#include "stdafx.h"
#include "Node.h"

Node::Node(void)	{

}

void Node::addObject(Spatial *toAdd) {
	nodeList.push_back(toAdd);
}

void Node::removeObject(Spatial *toRemove) {
	nodeList.remove(toRemove);
}

bool Node::contains(Spatial *cont) {
	std::list<Spatial *>::iterator iter =  nodeList.begin();

	while( iter != nodeList.end() ) {
      if (cont == *iter) return true;
      ++iter;
    }

	return false;
}

std::list<Spatial *>* Node::getContents(void) {
	std::list<Spatial *> *ret;
	*ret = nodeList;
	return ret;
}